#include "ros/ros.h"
#include "std_msgs/String.h"

void doMSG(const std_msgs::String::ConstPtr &msg)
{
    ROS_INFO("翠花订阅的消息是：%s", msg->data.c_str());
}

int main(int argc, char *argv[])
{
    /* code */
    setlocale(LC_ALL,"");

    ros::init(argc, argv, "cuihua");
    ros::NodeHandle nh;
    ros::Subscriber sub = nh.subscribe("fang", 10, doMSG);

    ros::spin();

    return 0;
}

